Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

296
Views
Getting "Module parse failed: Unexpected character '@' (1:0)" in NEXT JS

I'm working on my first NEXT Js project and I'm getting this error while importing a font from URL like this.

@import url('https://fonts.googleapis.com/css?family=Nunito+Sans:300,400,600,700,800&display=swap');

I'm getting this issue while running dev server:

Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
> @import url('https://fonts.googleapis.com/css?family=Nunito+Sans:300,400,600,700,800&display=swap');

My Next Config file:

if (typeof require !== 'undefined') {
  require.extensions['.less'] = file => { };
}

const withLess = require('@zeit/next-less'),
  nextConfig = {
    //target: 'serverless',
    env: {
      weatherApi: '',
      mapBoxApi: '',
      // port: 'http://localhost:4000/'
      // port: 'http://3.134.94.242:4000/'
      port: 'http://3.134.94.242:4000/'
    },
    onDemandEntries: {
      maxInactiveAge: 1000 * 60 * 60,
      pagesBufferLength: 5
    },
    lessLoaderOptions: {
      javascriptEnabled: true
    },
    webpack: config => config
  };

module.exports = withLess(nextConfig);

Any help would be appreciated.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!